package com.xiaozou.enums;

import lombok.Getter;

@Getter
public enum RecognizePoint {
    TURING_SHOP(1, "图灵店铺模型"),
    TURING_INDUSTRY(2, "图灵行业模型"),
    REWRITE_TURING_INDUSTRY(21, "重写问题命中图灵行业模型"),
    PU_HUI(3, "普惠模型"),
    GENERAL(4, "通用问法"),
    AI_CLASSIFY(5, "AI分类"),
    REWRITE_GENERAL(41, "重写问题命中通用问法"),
    OUTER_SYSTEM(6, "外部系统匹配")
    ;

    private final int code;
    private final String desc;

    RecognizePoint(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static RecognizePoint of(Integer code) {
        for (RecognizePoint recognizePoint : values()) {
            if (recognizePoint.getCode() == code) {
                return recognizePoint;
            }
        }
        return null;
    }

}
